package persistency.writer;

import java.util.List;

public abstract class ContainerWriter extends Writer {

	/**
	 * @param filePath The file that will be used to store the data
	 * @param header The header that will be written in data file
	 */
	public ContainerWriter(String filePath, String header) {
		super(filePath, header);
		
	}
	
	/**
	 * Writes a list of Writables to a text file
	 * @param writables the List of writables that will be written to the text file
	 */
	public void write(List<? extends Writable> writables){
		for(int i=0; i < writables.size(); i++){
			write(writables.get(i));
		}
		close();
	}

}
